<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://store.com/taglib" prefix="s" %>  
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>User Manage</title>
<script type="text/javascript" src="../js/common/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="../js/common/aceTemplate.js"></script>
<script type="text/javascript" src="../js/common/TemplateUtil.js"></script>
<script type="text/javascript" src="../js/common/AJAX.js"></script>
<script type="text/javascript" src="../js/context.js"></script>

<script type="text/javascript" src="../js/external/user/UserMsg.js"></script>

	<script type="text/javascript">
	$(function(){
		var user_list = new AJAX().getUnAsync(Context.userManage.selectUser);
		var data = {
				documents:new AJAX().parseToJson(user_list)
		};
		var html = TemplateUtil.genelateAceValue("brand-list",data);
		$("#tbody").append(html);
	});	
	</script>
</head>
<body>
	<div id="content">
		<table border="1">
			<thead>
				<tr>
					<th width="20%">ID</th>
					<th  width="30%">penName</th>
					<th  width="20%">perSex</th>
					<th  width="30%">操作</th>
				</tr>
			</thead>
			<tbody id="tbody">
				
			
			</tbody>
		</table>
		
	</div>
	
	<script id="brand-list" type="text/template">
		for(var i = 0; i < this.documents.length; i++){ 
			<tr class="nomal "  bid ="<s:OutPutHTML html="#{this.documents[i].ID}"/>">
				 <td> <s:OutPutHTML html="#{this.documents[i].ID}"/> </td>
				 <td> <s:OutPutHTML html="#{this.documents[i].penName}"/> </td>
				 <td> 
				 	<s:OutPutHTML html="#{this.documents[i].perSex}"/>
				 </td>
				 <td  class="action" >
				 	<div>
					 	<a href="javascript:void(0)" onclick="UserMsg.editUser(this)" >编辑</a>
					 	<a href="javascript:void(0)" onclick="UserMsg.deleteUser(this)" >删除</a>
				 	</div>
				 </td>
			</tr>
		}
	</script> 
</body>
</html>